On the Subject of The Red Cipher
Seeing red is the standard for this module.
On the module, you will see 3 screens, a keyboard, 2 arrows, and a submit button that displays the current page you’re on.
Pressing the right arrow takes you to the next page. Pressing the left arrow takes you to the previous page. There is a total of 2 pages.
On page 1, the top screen shows a 6 letter encrypted word, the middle screen shows a 6 letter string. If the encrypted word has any Js, replace each J with the letter in the same position as the string in the middle screen. After you do all 3 steps, change the letter(s) back into a J.
On page 2, all 3 screens show a word. The top screen will be referred to as KW1, the middle screen will be called KW2, and finally the bottom screen will be KW3.
Take the encrypted word and follow the mechanics down below:
Step 1: Playfair Cipher
For this step use KW1 to create the 1st matrix.
To create it, first replace any Js with Is, and remove any duplicate letters from the keyword (keep each letter’s first occurrence). Then take the alphabet and remove any occurrences of all the letters in your current key.
If the first digit of the serial number is odd, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.
Once you have the 25 length string, create a 5×5 matrix of letters.
Split the encrypted word into character pairs. For each pair:
- If the 2 letters are exactly the same, keep them as is.
- Otherwise, if the letters appear on the same row of your matrix, replace them with the letters to their immediate left respectively, wrapping around to the right side of the row.
- Otherwise, if the letters are on the same column of your matrix, replace them with the letters immediately above, wrapping to the bottom.
- Otherwise, replace each of them with the letter on the same row but in the column of the other letter in the original pair.